﻿using Newtonsoft.Json;

namespace Hpt.Device.Sample.Dto;

public class TransactionRequest
{
    /// <summary>
    /// 交易额
    /// </summary>
    public string Amount { get; set; }

    /// <summary>
    /// 指纹
    /// </summary>
    public string Finger { get; set; }

    /// <summary>
    /// 余额
    /// </summary>
    public string Money { get; set; }

    /// <summary>
    /// 名字
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 补贴
    /// </summary>
    public string Subsidy { get; set; }

    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string CardNo { get; set; }

    /// <summary>
    /// 交易类型
    /// </summary>
    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string Mode { get; set; }

    /// <summary>
    /// 消费菜单
    /// </summary>
    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public TransactionMenu[] Menus { get; set; }

    /// <summary>
    /// 安全验证码
    /// </summary>
    [JsonProperty(Required = Required.Always)]
    public string Code { get; set; }

    /// <summary>
    /// 手机号
    /// </summary>
    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string UserName { get; set; }

    /// <summary>
    /// 消费密码
    /// </summary>
    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string Password { get; set; }

    public string QROrder { get; set; }

    public string QR { get; set; }

    ///// <summary>
    ///// 密码类型（账户消费密码\随机验证码）
    ///// </summary>
    //public string AuthorizationType { get; set; }

    /// <summary>
    ///  0刷卡  1微信   2支付宝
    /// </summary>
    public byte PayType { get; set; }

    //[JsonProperty(PropertyName = "Order", NullValueHandling = NullValueHandling.Ignore)]
    //public string TransactionNumber { get; set; }

    /// <summary>
    /// 指纹ID
    /// </summary>
    public string FingerID { get; set; }

    public string FaceID { get; set; }

    public string ImageID { get; set; }

    /// <summary>
    /// 消费订单号（设备生成）
    /// </summary>
    [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
    public string Order { get; set; }

    public class TransactionMenu
    {
        public string MenuID { get; set; }

        public string Count { get; set; }
    }
}